﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CoolCode.Web.Mvc.UI.Grid
{
	public class LinkRender
	{
		public string Render(string updateTarget)
		{
			updateTarget = JQueryHelper.FormatElement(updateTarget);
			string script = string.Format(@" $.post(this.href, $('form').serialize(), function(data) {{$('{0}').html(data);}}); return false;",
				updateTarget);
			return script;
		}
	}
}
